#ifndef MUSICSLIDER_H
#define MUSICSLIDER_H

#include <QWidget>

namespace Ui {
class musicslider;
}

class musicslider : public QWidget
{
    Q_OBJECT

public:
    explicit musicslider(QWidget *parent = nullptr);
    ~musicslider();
     void setStep(float bf);
private:
    void mousePressEvent(QMouseEvent *event); // 重写⿏标按下事件
    void mouseMoveEvent(QMouseEvent *event); // 重写⿏标滚动事件
    void mouseReleaseEvent(QMouseEvent *event); // 重写⿏标释放事件
    void moveSilder();


private:
    Ui::musicslider *ui;
    int currentPos;
    int  maxWidth;
signals:
    void setMusicSliderPosition(float);
};

#endif // MUSICSLIDER_H
